<?php
	DB()->query("CREATE TABLE IF NOT EXISTS `cn_rpt_schedules` (`rpt_id` bigint(20) NOT NULL auto_increment, `rpt_mode` varchar(21), `rpt_start` datetime, `rpt_end` datetime, `rpt_content` bigint(20) NOT NULL, `rpt_for` int(4) default '0', `rpt_unit` varchar(10), PRIMARY KEY (`rpt_id`), KEY (`rpt_content`))");
	DB()->query("CREATE TABLE IF NOT EXISTS `cn_rpt_occurrences` (`occurrence_id` bigint(20) NOT NULL auto_increment, `occurrence_start` datetime, `occurrence_end` datetime, `occurrence_listing` bigint(20), `occurrence_schedule` bigint(20), KEY(`occurrence_listing`), PRIMARY KEY (`occurrence_id`))");
	DB()->query("CREATE TABLE IF NOT EXISTS `cn_open_close_schedules` (`oc_id` bigint(20) NOT NULL auto_increment, `oc_open` TIME, `oc_close` TIME, `oc_days` varchar(21), `oc_listing` BIGINT(20), PRIMARY KEY (`oc_id`), KEY (`oc_listing`))");
	//DB()->query("CREATE TABLE IF NOT EXISTS `cn_rpt_schedule_exceptions` (`rex_id` bigint(20) NOT NULL auto_increment, `rex_schedule` BIGINT(20), `rex_date` DATE, PRIMARY KEY (`rex_id`), KEY (`rex_schedule`))");
	//DB()->query("CREATE TABLE IF NOT EXISTS `cn_open_close_exceptions` (`ocex_id` bigint(20) NOT NULL auto_increment, `ocex_schedule` BIGINT(20), `ocex_date` DATE, PRIMARY KEY (`ocex_id`), KEY (`ocex_schedule`))");
?>